0 CLS:CLEAR300:DIMC1,C2,CC,MC,ZZ,W(6,9),W$(6),A(9),MN$(10),I$(2):C1=RND(-(PEEK(9)*256+PEEK(10))):MC=16384:GOTO10
1 C1=1:CC=32
2 IFMID$(M$,CC,1)<>""ANDMID$(M$,CC,1)<>" "THENCC=CC-1:GOTO2
3 PRINTMID$(M$,C1,CC-C1):C1=CC+1:CC=C1+31:IFC1<=LEN(M$)THEN2
4 RETURN
5 ZZ=LEN(M$):C2=(PEEK(384)AND1)*256+PEEK(385):GOSUB1:CC=((PEEK(384)AND1)*256+PEEK(385))-1
6 ON1-(C2=480)GOTO8:ON1-(ZZ>31)GOTO7:C2=416:CC=479:GOTO8
7 C2=448:CC=479
8 FORC1=C2+MCTOCC+MC:POKEC1,PEEK(C1)-64:NEXT:RETURN
10 CLS:M$="     DUNGEONS AND DRAGONS":GOSUB5:M$="       BY PETER TREFONAS":GOSUB5
20 FORI=0TO10:READMN$(I):NEXT:FORI=0TO6:READW$(I):NEXT:I$(0)="FIST":FORI=2TO9:READA(I):NEXT
30 FORJ=0TO6:FORI=0TO9:READW(J,I):NEXT:NEXTJ
40 M$="YOU'RE OFF TO THE CATACOMBS TO FIND A LARGE BLUE-WHITE DIAMOND."
50 M$=M$+"USE THE N, S, E, W, U AND D KEYS WHILE IN TRAVEL":GOSUB1
55 M$="MODE. IN COMMAND MODE USE TAKE, SAY, EAT, SCORE, FILL, LIGHT, CLUE OR HIT ENTER TO SWITCH TO TRAVEL MODE. "
60 M$=M$+"IN ATTACK MODE USE A (REGULAR ATTACK), B (ALL-OR-NOTHING), P (PRAY), S":GOSUB1
65 M$="(STAND UP), FIST, DAGGER, MACE, SWORD, BATTLE AXE, MORNING STAR OR TWO-HANDED SWORD.":GOSUB1
70 PRINTTAB(6)"PRESS enter TO BEGIN";:INPUTM$
75 CLS:INPUT"WHAT IS YOUR NAME";N$:INPUT"YOUR GOD'S NAME";G$
90 GOSUB890:DX=RO:GOSUB890:ST=RO+15:ES=ST:AC=RND(3)+1:M1=10+RND(25)
100 MO=M1:PRINT"YOUR DEX=";DX,"STRENGTH=";ST,"ARMOR CLASS=";AC,"MONEY=";MO;"GP":FORA=1TO2
110 PRINT"WEAPON";STR$(A);:INPUTA$
120 FORI=0TO6:IFLEFT$(A$,3)=LEFT$(W$(I),3)THEN130
125 NEXT:PRINT"WHAT? START OVER!":GOTO100
130 IFMO-W(I,1)<0THENPRINT"YOU DON'T HAVE ENOUGH MONEY":GOTO110
140 I$(A)=W$(I):MO=MO-W(I,1):PRINT"NOW HAVE";MO;"GOLD PIECES":NEXTA
150 TC=MO*2:CA=MO:M$="YOU MAY ALSO HAVE"+STR$(TC)+" TORCHES AND"+STR$(CA)+" ELVEN CAKES.":GOSUB1:GOTO30000
200 A$="":PRINT"IN COMMAND MODE:":INPUTA$
205 IFA$=""ORA$="TRAVEL"THENRETURN
206 IFA$="N"ORA$="S"ORA$="E"ORA$="W"ORA$="U"ORA$="D"THENRETURN
207 IFA$="SCORE"THENPRINT"YOUR PRESENT SCORE IS";SC:GOTO200
210 IFA$="EAT"THENPRINT"EAT WHAT?":GOTO200
220 IFA$="SAY"THENPRINT"SAY WHAT?":GOTO200
230 IFA$="LIGHT LAMP"THEN232
231 GOTO240
232 IFLF=2THENM$="OK. IT WILL ACT AS AN ADDITIONAL TORCH.":GOSUB1:TI=TI-20:LF=0:RETURN
233 IFLF=0THENGOSUB380:GOTO200
240 IFLEFT$(A$,8)<>"EAT CAKE"THEN244
241 IFCA>0THENES=ES+RND(6):CA=CA-1:GOTO260
242 PRINT"BUT YOU HAVE NO ELVEN CAKES.":GOTO200
244 IFLEFT$(A$,8)="EAT MUSH"THENM$="IT DOESN'T TASTE THAT BAD":GOSUB1:GOTO200
245 IFLEFT$(A$,6)<>"EAT FU"THEN250
246 IFRND(2)=1THEN13535
247 M$="IT HAD A RATHER BITTER TASTE.":GOSUB1:GOTO200
250 IFA$="EAT MOLD"ORA$="FILL LAMP"ORA$="SAY BLUB"ORA$="RUB LAMP"ORA$="TAKE"THENRETURN
255 GOSUB750:GOTO200
260 IFES>STTHENES=ST
262 IFCK=1ANDRND(2)=1THENGOSUB870:GOSUB900:M$="THE ELVEN CAKES WERE INFECTED WITH MUMMY ROT!":GOSUB1:GOTO50000
270 M$="YOUR STRENGTH IS NOW UP TO"+STR$(EST)+".":GOSUB1:GOTO200
380 PRINT"I'M GAME-- TELL ME HOW.":GOSUB1:RETURN
750 PRINT"...NOTHING UNUSUAL HAPPENS.":GOSUB1:RETURN
800 PRINT"IN TRAVEL MODE:"
802 IFRND(5)=1THENM$="YOU HEAR A RUSTLING NOISE IN A NEARBY ROOM!":GOSUB1
804 PRINT"DIRECTION? ";
805 A$=INKEY$:ON1-(A$<>"")GOTO805:PRINTA$
806 G=0:TI=TI+1:IFTI>18THENM$="YOUR TORCH BURNT OUT-- YOU LIGHT ANOTHER. YOU NOW HAVE"+STR$(TC)+" LEFT.":GOSUB1:TI=0:TC=TC-1
807 IFTC<>0THEN810
808 PRINT"YOU NOW HAVE NO TORCHES.":GOSUB870:GOSUB900:PRINT"IT IS NOW PITCH BLACK!":GOSUB900
809 M$="YOU HAVE FALLEN INTO A PIT AND BROKE EVERY BONE IN YOUR BODY!":GOSUB1:GOTO50000
810 IFA$="W"THENG=1
820 IFA$="E"THENG=2
830 IFA$="N"THENG=3
840 IFA$="S"THENG=4
850 IFA$="U"THENG=5
860 IFA$="D"THENG=6
862 IFA$=CHR$(128)THENG=7
863 IFG=0THEN804
864 RETURN
870 PRINT"* * WARNING * *":RETURN
880 PRINT"* * ALERT * *":RETURN
890 RO=RND(6)+RND(6)+RND(6):RETURN
900 FORI=1TO2500:NEXT:RETURN
910 M$="THERE IS NOWHERE TO GO IN THAT DIRECTION.":GOSUB1:RETURN
920 ML=0:M$="THERE IS A "+MN$(MN)+" IN THIS ROOM.":GOSUB1
930 M$="IT IS ARMED WITH A "+W$(MB)+" AND IS ARMOUR CLASS"+STR$(MR)+".":GOSUB1:RETURN
940 J=0:INPUT"DO YOU WANT TO TRY TO RUN";A$:RETURN
950 SC=SC+3:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:J=0
960 IFRND(3)=1AND(A$="Y"ORA$="YES")THENPRINT"YOU GOT AWAY!":J=1:SC=SC-3
962 RETURN
970 MN=RND(4):MB=RND(4):MR=RND(5)+4:MA=0:MS=RND(18):RETURN
1000 M$="YOU ARE IN THE ROOM OF MISTS":GOSUB5
1001 M$="A THICK STEEL BLUE MIST SWIRLS OVER THE FLOOR. THERE IS A LIGHT ABOVE YOU AND A PASSAGE GOING EAST.":GOSUB1
1100 IFRND(0)>.2ANDFA=1THEN1500
1110 GOSUB970:GOSUB950:IFJ=1THEN1800
1111 GOSUB40000:FA=1:SC=SC+2
1500 GOSUB200
1800 GOSUB800:IFG=2THEN16000
1810 IFG=5THEN30000
1820 GOSUB910:GOTO1800
2000 M$="YOU ARE IN THE SLAB ROOM":GOSUB5
2001 M$="A LARGE SLAB HAS FALLEN FROM THE CEILING ONTO THE FLOOR. PASSAGES GO NORTH, EAST AND WEST.":GOSUB1
2050 M$="A DEEP HOLLOW VOICE SAYS 'BLUB'!":GOSUB1
2060 IFFB=1THEN2100
2061 M$="THERE ARE TWO ELVEN CAKES ON THE SLAB!":GOSUB1
2100 IFRND(0)>.1THEN2500
2110 GOSUB970:GOSUB950:IFJ=1THEN2800
2111 GOSUB40000
2500 GOSUB200
2510 IFA$="TAKE"THENCA=CA+2:FB=1:PRINT"GOT 'EM."
2800 GOSUB800:ONGGOTO16000,17000,22000
2810 GOSUB910:GOTO2800
3000 M$="YOU ARE IN THE PARLOUR OF THE DEAD":GOSUB5
3001 M$="ASSORTED BONES LIE SCATTERED OVER THE FLOOR. PASSAGES OPEN TO THE EAST, WEST, AND SOUTH.":GOSUB1
3100 IFFC=1THEN3500
3110 MN=9:MB=RND(3)+3:MR=3:MA=2:MS=RND(15)+10:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:GOSUB960:IFJ=1THEN3800
3111 FC=1:GOSUB40000:SC=SC+10
3500 GOSUB200
3800 GOSUB800:ONGGOTO17000,21000,3810,18000
3810 GOSUB910:GOTO3800
4000 M$="YOU ARE IN THE ANTE-ROOM":GOSUB5:M$="THE WALLS ARE PANELLED WITH BLACK WALNUT.":GOSUB1
4001 M$="PLUSH FURNITURE LIES ON A THICK RED CARPET. THERE IS A DOOR TO THE EAST.":GOSUB1
4100 IFFD=1THEN4500
4110 MN=0:MB=2:MR=2:MA=2:MS=RND(15)+10:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:GOSUB960:IFJ=1THEN4800
4111 FD=1:GOSUB40000:SC=SC+13
4150 M$="THE VAMPIRE IS WEARING A JEWEL ENCRUSTED RING!":GOSUB1
4500 GOSUB200
4510 IFA$="TAKE"THENM$="IT IS A RING OF PROTECTION! YOUR AC. IS NOW 2!":GOSUB1:AC=2
4800 GOSUB800:IFG=2THEN5000
4810 GOSUB910:GOTO4800
5000 M$="YOU ARE IN THE PURPLE VAULT":GOSUB5
5001 M$="THE WALLS WERE HEWN OUT OF A PURPLE STONE. THE CEILNG ARCHES FAR OVERHEAD. PASSAGES GO NORTH, EAST AND WEST.":GOSUB1
5100 IFFE=1THEN5500
5105 IFFE<>1THENM$="THERE IS AN ELVEN CAKE IN THE CORNER!":GOSUB1
5110 MN=RND(3)+4:MB=RND(5)+1:MR=RND(5)+1:MA=1:MS=RND(10)+8:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:GOSUB960:IFJ=1THEN5800
5111 FE=1:GOSUB40000:SC=SC+9
5500 GOSUB200
5510 IFA$="TAKE"THENCA=CA+1:PRINT"GOT IT."
5800 GOSUB800:ONGGOTO4000,20000,18000
5810 GOSUB910:GOTO5800
6000 M$="YOU ARE IN THE CHAMBER OF FIRES":GOSUB5:M$="THE AIR IS STIFLING HOT, AND THE WALLS ARE WARM TO THE TOUCH.":GOSUB1
6010 M$="A RED GLOW EMINATES FROM THE SMOKE ALONG THE SE CORNER. PASSAGES OPEN NORTH AND WEST.":GOSUB1
6100 IFFF=1THEN6500
6110 MN=8:MB=3:MR=3:MA=0:MS=RND(5)+11:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:GOSUB960:IFJ=1THEN6800
6111 FF=1:GOSUB40000:SC=SC+11
6200 M$="THERE IS A BOX IN THE CORNER WITH A FLASK IT!":GOSUB1
6500 GOSUB200
6510 IFA$="TAKE"THENM$="IT IS A POTION OF SUPERHUMAN SPEED!":GOSUB1:DX=DX+3
6800 GOSUB800:ONGGOTO20000,6810,21000
6810 GOSUB910:GOTO6800
7000 M$="YOU ARE IN THE ORIENTAL ROOM":GOSUB5
7001 M$="ORIENTAL DRAWINGS DECORATE THE WALLS. DOORS GO NORTH, EAST AND WEST.":GOSUB1
7200 IFFG=1THEN7500
7201 M$="THERE IS A ANCIENT BRASS LAMP IN THE CENTRE OF THE ROOM!":GOSUB1
7500 GOSUB200
7510 IFA$="TAKE"THENFG=1:LF=1:PRINT"IT'S YOURS."
7800 GOSUB800:ONGGOTO22000,24000,23000
7810 GOSUB910:GOTO7800
8000 M$="YOU ARE IN THE GROTTO OF THE LOST":GOSUB5:M$="A STEEL DOOR CLOSED BEHIND YOU-- THERE IS NO ESCAPE!":GOSUB1:GOSUB900
8100 IFFH=1THEN8500
8110 MN=7:MB=5:MR=5:MA=2:MS=RND(5)+15:GOSUB890:MD=RO:GOSUB880:GOSUB920:FH=1:GOSUB900:GOSUB900:GOSUB40000:SC=SC+14
8200 M$="THE "+MN$(MN)+" IS WEARING A AMULET.":GOSUB1
8500 GOSUB200
8510 IFA$="TAKE"THENM$="IT SEEMS TO HAVE INCREASED YOUR STRENGTH!":GOSUB1:EST=EST+8:ST=ST+8:GOSUB200
8515 IFA$="SAY BLUB"THENSC=SC+2:GOTO11000
8520 GOTO8000
9000 M$="YOU ARE IN THE DUST BIN":GOSUB5
9001 M$="THIS IS A CIRCULAR ROOM, AND A PILE OF RUBBISH LIES AGAINST THE EAST WALL.":GOSUB1
9002 M$="THERE SEEMS TO BE AN OPENING ABOVE THE RUBBISH, AND A PASSAGE TO THE WEST.":GOSUB1
9100 IFRND(0)>.2THEN9500
9110 GOSUB970:GOSUB950:IFJ=1THEN9800
9111 GOSUB40000
9500 GOSUB200
9800 GOSUB800:IFG=1THEN23000
9810 IFG=5THEN25000
9820 GOSUB910:GOTO9800
10000 M$="YOU ARE IN THE PIT ROOM":GOSUB5
10001 M$="ALONGSIDE YOU THERE IS A TEN-FOOT DEEP PIT. DOORS GO TO THE EAST AND WEST.":GOSUB1
10100 IFFJ=1THEN10500
10110 MN=4:MB=RND(3)+1:MR=RND(3)+3:MA=2:MS=RND(10)+5:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:GOSUB960:IFJ=1THEN10800
10111 FJ=1:GOSUB40000:SC=SC+8
10500 GOSUB200
10800 GOSUB800:ONGGOTO24000,19000
10810 IFG=6THEN31000
10820 GOSUB910:GOTO10800
11000 M$="YOU ARE IN THE CRYPT OF THE MINDLESS":GOSUB5
11001 M$="THERE IS A SARCOPHAGUS IN THE CENTRE OF THE ROOM. DOORS OPEN TO THE EAST AND WEST.":GOSUB1
11200 IFCK=0THENM$="THERE IS TWO ELVEN CAKES ON THE SARCOPHAGUS!":GOSUB1
11500 GOSUB200
11510 IFA$="TAKE"THENCK=1:CA=CA+2:PRINT"GOT 'EM."
11800 GOSUB800:ONGGOTO19000,12000
11810 GOSUB910:GOTO11800
12000 M$="YOU ARE IN THE TORTURE ROOM":GOSUB5
12001 M$="ASSORTED GRUESOME EQUIPMENT FILLS THE ROOM. DOORS OPEN TO THE EAST AND WEST.":GOSUB1
12100 IFFL=1THEN12500
12110 MN=10:MB=6:MR=4:MA=1:MS=RND(15)+10:GOSUB890:MD=RO:GOSUB880:GOSUB920:GOSUB940:GOSUB960:IFJ=1THEN12800
12111 FL=1:GOSUB40000:SC=SC+18
12500 GOSUB200
12800 GOSUB800:ONGGOTO11000,27000
13000 M$="YOU ARE IN MYCORHYZZIA":GOSUB5
13001 M$="MOLDS, FUNGUS AND LARGE MUSHROOMS FILL THE ROOM. PASSAGES GO TO THE EAST AND WEST AND A STAIRCASE GOES UP.":GOSUB1
13500 GOSUB200
13510 IFA$<>"EAT MOLD"THEN13800
13520 INPUT"WHAT COLOUR DO YOU PREFER";A$
13530 IFA$="YELLOW"THENM$="ALL OF YOUR WOUNDS HAVE BEEN CURED!":GOSUB1:ES=ST:GOTO13500
13535 PRINT"YOU HAVE POISONED YOURSELF!":GOTO50000
13800 GOSUB800:ONGGOTO27000,28000,13810,13810,26000
13810 GOSUB910:GOTO13800
14000 M$="YOU ARE IN THE DRAGON'S LAIR":GOSUB5:M$="A LARGE OPENING LEADS TO THE WEST.":GOSUB1
14100 IFFO=1THEN14800
14200 M$="AN ENORMOUS GREEN DRAGON WAS SLEEPING ON A BEAUTIFUL PERSIAN RUG.":GOSUB1:GOSUB900
14201 M$="HOWEVER YOU JUST WOKE HIM UP, AND HE IS very ANGRY!":GOSUB1
14210 INPUT"COMMAND";A$
14220 IFA$="RUN"ORA$="TRAVEL"ORA$="T"THENM$="THE DRAGON SLAMMED THE DOOR CLOSED WITH ITS HUGE TAIL.":GOSUB1:GOTO14210
14230 IFA$="ATTACK"ORA$="KILL"ORA$="FIGHT"THEN14500
14235 IFA$="CLUE"ORA$="GIVE CLUE"THENM$="TRY USING SOMETHING YOU HAVE FOUND.":GOSUB1:GOTO14210
14240 IFLEFT$(A$,4)="FEED"THENM$="THE DRAGON ENJOYED THE MEAL-- YOU AND THE ELVEN CAKES!":GOSUB1:GOTO50000
14245 IFLEFT$(A$,4)="GIVE"THENM$="DRAGONS DON'T LIKE CHARITY-- IF THEY WANT SOMETHING, THEY TAKE IT.":GOSUB1:GOTO14210
14250 IFLEFT$(A$,4)="THRO"THENM$="YOU INFURIATED THE DRAGON AND HE FLAMED YOU TO A CRISP!":GOSUB1:GOTO50000
14260 IFA$<>CHR$(128)ANDA$<>"BLUB"THEN14265
14262 M$="GOOD TRY, BUT THE SECRET WORD WILL NOT WORK YET.":GOSUB1:GOTO14210
14265 IFA$="RUB LAMP"ANDLF=1THEN14600
14268 IFA$="PRAY"THENM$="NOT EVEN "+G$+" COULD DESTROY A DRAGON THIS LARGE WITH A LIGHTING BOLT.":GOSUB1:GOTO14210
14270 PRINT"WHAT? TRY SOMETHING ELSE":GOTO14210
14500 INPUT"WITH YOUR PUNY LITTLE WEAPON";A$:IFA$="Y"ORA$="YES"THENM$="THE DRAGON FLAMED YOU WELL DONE!":GOSUB1:GOTO50000
14501 GOTO14210
14600 PRINT"POOF!":GOSUB900:M$="A GENIE POPPED OUT OF YOUR LAMP.":GOSUB1
14610 GOSUB900:M$="THE GENIE BANISHED THE DRAGON WITH A SNAP OF THE FINGERS!":GOSUB1
14700 M$="HE THANKED YOU FOR FREEING HIM AND DISAPPEARED!":GOSUB1:FO=1:SC=SC+25
14800 GOSUB800:IFG=1THEN28000
14810 IFG=7THEN29000
14820 GOSUB910:M$="IF YOU'RE TRYING TO GET IN A SECRET ROOM, TRY RUBBING YOUR LAMP IN A CORRIDOR ELSEWHERE.":GOSUB1:GOTO14800
15000 M$="YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL DIFFERENT":GOSUB5
15500 GOSUB200
15800 GOSUB800:IFRND(0)>.12THEN15000
15810 ONRND(2)GOTO25000,26000
16000 M$="YOU ARE IN THE COBBLED HALL":GOSUB5
16001 M$="LARGE MOSS-COVERED COBBLESTONES COVER THE FLOOR. PASSAGES OPEN TO THE EAST AND WEST.":GOSUB1
16100 IFRND(0)>.1THEN16500
16110 GOSUB970:GOSUB950:IFJ=1THEN16800
16111 GOSUB40000
16500 GOSUB200
16800 GOSUB800:IFG=1THEN1000
16810 IFG=2THEN2000
16820 GOSUB910:GOTO16800
17000 M$="YOU ARE IN THE NARROW TUNNEL":GOSUB5:M$="THERE ARE OPENINGS TO THE EAST AND WEST.":GOSUB1
17100 IFRND(0)>.2THEN17500
17110 GOSUB970:GOSUB950:IFJ=1THEN17800
17111 GOSUB40000
17500 GOSUB200
17800 GOSUB800:ONGGOTO2000,3000
17810 GOSUB910:GOTO17800
18000 M$="YOU ARE IN A TIGHT PASSAGE":GOSUB5:M$="MOLD APPEARS TO BE GROWING ABOVE. PASSAGES GO NORTH AND SOUTH.":GOSUB1
18100 IFRND(0)>.2THEN18500
18110 GOSUB970:GOSUB950:IFJ=1THEN18800
18111 GOSUB40000
18500 GOSUB200
18510 IFA$="EAT MOLD"THENPRINT"YOU HAVE POISONED YOURSELF!":GOTO50000
18800 GOSUB800:IFG=3THEN3000
18810 IFG=4THEN5000
18820 GOSUB910:GOTO18800
19000 M$="YOU ARE AT A THREE WAY INTERSECTION":GOSUB5:M$="PASSAGES GO EAST, WEST, AND SOUTH.":GOSUB1
19100 IFRND(0)>.1THEN19500
19110 GOSUB970:GOSUB950:IFJ=1THEN19800
19111 GOSUB40000
19500 GOSUB200
19800 GOSUB800:ONGGOTO10000,11000,19810,21000
19810 GOSUB910:GOTO19800
20000 M$="YOU HAVE ENTERED THE TUNNEL OF THE LOST":GOSUB5
20001 M$="IT IS SAID THAT ANYONE WHO ENTERS THIS TUNNEL WILL NEVER RETURN BY THE SAME ROUTE.":GOSUB1
20002 M$="PASSAGES OPEN TO THE EAST AND WEST.":GOSUB1
20100 IFRND(0)>.25THEN20500
20110 GOSUB970:GOSUB950:IFJ=1THEN20800
20111 GOSUB40000
20500 GOSUB200
20800 GOSUB800:ONGGOTO20840,6000
20820 GOSUB910:GOTO20800
20840 M$="A SPIKE-STUDDED DOOR WAS SLAMMED IN YOU FACE! YOU CANNOT GET OUT THIS WAY.":GOSUB1:GOTO20800
21000 M$="YOU ARE AT THREE CORNERS":GOSUB5:M$="DOORS OPEN TO THE NORTH, SOUTH AND WEST.":GOSUB1
21100 IFRND(0)>.1THEN21500
21110 GOSUB970:GOSUB950:IFJ=1THEN21800
21111 GOSUB40000
21500 GOSUB200
21800 GOSUB800:ONGGOTO3000,21810,19000,6000
21810 GOSUB910:GOTO21800
22000 M$="YOU ARE IN HIGH HALLS":GOSUB5
22001 M$="THE CEILING IS FAR ABOVE YOUR HEAD. THERE ARE OPENINGS SOUTH OF YOU, AND ANOTHER TURNS EAST.":GOSUB1
22100 IFRND(0)>.05THEN22500
22110 GOSUB970:GOSUB950:IFJ=1THEN22800
22111 GOSUB40000
22500 GOSUB200
22800 GOSUB800:IFG=2THEN7000
22801 IFG=4THEN2000
22820 GOSUB910:GOTO22800
23000 M$="YOU ARE IN T-SHAPED PASSAGE":GOSUB5:M$="DOORS OPEN TO THE EAST, WEST AND SOUTH.":GOSUB1
23100 IFRND(0)>.15THEN23500
23110 GOSUB970:GOSUB950:IFJ=1THEN23800
23111 GOSUB40000
23500 GOSUB200
23800 GOSUB800:ONGGOTO8000,9000,23810,7000
23810 GOSUB910:GOTO23800
24000 M$="YOU ARE IN THE PADDED PASSAGE":GOSUB5:M$="THERE ARE OPENINGS TO THE EAST AND WEST.":GOSUB1
24100 IFRND(0)>.05THEN24500
24110 GOSUB970:GOSUB950:IFJ=1THEN24800
24111 GOSUB40000
24500 GOSUB200
24800 GOSUB800:ONGGOTO7000,10000
24810 GOSUB910:GOTO24800
25000 M$="YOU ARE IN THE DUSTY CORRIDOR":GOSUB5:M$="THE PASSAGE GOES EAST AND WEST.":GOSUB1
25100 IFRND(0)>.5THEN25500
25110 GOSUB970:GOSUB950:IFJ=1THEN25800
25111 GOSUB40000
25500 GOSUB200
25510 IFA$="RUB LAMP"ANDLF=1THENM$="A TINY VOICE SAYS 'TRY SHIFT- B'.":GOSUB1 
25800 GOSUB800:ONGGOTO9000,15000
25810 GOSUB910:GOTO25800
26000 M$="YOU ARE IN THE HALL OF 100 STAIRS":GOSUB5:M$="DOORS OPEN AT THE TOP AND BOTTOM OF THE STAIRCASE.":GOSUB1
26100 IFRND(0)>.3THEN26500
26110 GOSUB970:GOSUB950:IFJ=1THEN26800
26111 GOSUB40000
26500 GOSUB200
26800 GOSUB800:IFG=5THEN15000
26810 IFG=6THEN13000
26820 GOSUB910:GOTO26800
27000 M$="YOU ARE IN THE HALL OF NO RETURN":GOSUB5:PRINT"DOORS GO EAST AND WEST."
27100 IFRND(0)>.6THEN27500
27110 GOSUB970:GOSUB950:IFJ=1THEN27800
27111 GOSUB40000
27500 GOSUB200
27800 GOSUB800:IFG=2THEN13000
27900 IFG=1THENM$="A SPIKE STUDDED DOOR SLAMMED SHUT IN YOUR FACE!":GOSUB1:GOTO27800
27910 GOSUB910:GOTO27800
28000 M$="YOU ARE ON THE CATWALK":GOSUB5
28001 M$="A FIERCE WIND CHILLS YOU AS YOU STAND OVER A BOTTOMLESS CHASM. DOORS OPEN TO THE EAST AND WEST.":GOSUB1
28100 IFRND(0)>.4THEN28500
28110 GOSUB970:GOSUB950:IFJ=1THEN28800
28111 GOSUB40000
28500 GOSUB200
28800 GOSUB800:ONGGOTO13000,14000
28810 GOTO50000
29000 M$="YOU ARE IN THE NICHE":GOSUB5:PRINT"A PASSAGE GOES UPWARD."
29100 IFFZ=1THEN29500
29200 M$="THERE IS AN EGG SIZED DIAMOND IN HERE!":GOSUB1
29500 GOSUB200
29510 IFA$="TAKE"THENFZ=1:SC=SC+20:PRINT"YOU GOT IT!"
29800 GOSUB800:IFG=5THEN14000
29810 GOSUB910:GOTO29800
30000 M$="YOU ARE IN THE GREY WOOD":GOSUB5
30001 M$="IMPENETRABLE FOREST SURROUNDS YOU. THERE IS A PIT THAT OPENS BELOW YOU.":GOSUB1
30200 IFFZ<>1THEN30500
30201 M$="YOU HAVE ESCAPED THE DUNGEON WITH THE DIAMOND!":GOSUB1
30202 M$="CONSIDER YOURSELF A SEASONED EXPLORER AND A DAMN LUCKY PERSON!":GOSUB1:SC=SC+20:GOTO50500
30500 GOSUB200
30800 GOSUB800
30810 IFG=6THEN1000
30820 GOSUB910:GOTO30800
31000 M$="YOU ARE IN THE PIT":GOSUB5
31200 M$="THERE IS A SMALL AMOUNT OF OIL BUBLING OUT OF A CRACK.":GOSUB1
31500 GOSUB200
31510 IFLF=1ANDA$="FILL LAMP"THENM$="OK. YOU MAY LIGHT IT WHEN YOU WANT.":GOSUB1:LF=2
31800 GOSUB800:IFG=5THEN10000
31810 GOSUB910:GOTO31800
40000 CLS:PRINT"IN COMBAT MODE:":Z=0:YD=0
40020 SL=0:MW=0
40030 A=RND(DX):B=RND(MD):IFA=BTHEN40030
40040 IFA>B+MATHEN41000
40045 IFML=4THEN40180
40070 IFRND(0)>.9ANDMS>5THEN40190
40080 M$="THE "+MN$(MN)+" SWINGS ITS "+W$(MB)+"!":GOSUB1
40090 N=RND(20)+W(MB,AC)+YD-ML+SL
40100 IFN>=20THENPRINT"EXTREME DAMAGE!":SOUND1,1:HI=RND(W(MB,0))*2+2:GOTO40130
40105 IFN>=A(AC)+2THENPRINT"MAJOR DAMAGE!":SOUND25,1:HI=RND(W(MB,0))+2:GOTO40130
40110 IFN>=A(AC)THENPRINT"HIT!":HI=RND(W(MB,0)):SOUND50,1:GOTO40130
40112 IFN=<0THENM$="THE "+MN$(MN)+"'S "+W$(MB)+" BROKE!":SOUND200,1:GOSUB1:MB=0:Z=Z+1:GOTO40114
40113 PRINT"LUCKY...IT MISSED.":GOTO40020
40114 IFZ<>3THEN40020
40115 M$="THE "+MN$(MN)+" SURRENDERS.":GOSUB1:INPUT"DO YOU ACCEPT";A$
40116 IFA$="YES"ORA$="Y"THENM$="THE "+MN$(MN)+" RUNS AWAY!":GOSUB1:RETURN
40120 M$="YOU ANGERED "+G$+"!":GOSUB1:GOTO50000
40130 ES=ES-HI:M$="DAMAGE="+STR$(HI)+" "+N$+"'S STRENGTH="+STR$(ES):GOSUB1
40140 IFEST<0THEN50000
40150 IFHI>8THENYD=4:PRINT"YOU WERE knocked down!":GOTO40020
40170 GOTO40020
40180 M$="THE "+MN$(MN)+" STANDS UP":GOSUB1:ML=0:GOTO40020
40190 M$="THE "+MN$(MN)+" MAKES A WILD SLASH WITH ITS "+W$(MB)+"!":GOSUB1:MS=MS-1:SL=4:GOTO40090
41000 FORI=1TODX*10
41030 A$=INKEY$:IFA$<>""THEN41050
41040 NEXT:GOTO40020
41050 IFA$="A"THEN41110
41060 IFA$="B"THENSL=4:ES=ES-1:GOTO41110
41070 IFA$="S"THEN41100
41075 IFA$="P"THEN41090
41080 GOTO41040
41090 IFRND(0)>.9THENM$=G$+" DESTROYED THE "+MN$(MN)+" WITH A LIGHTING BOLT!":GOSUB1:RETURN
41095 GOTO40020
41100 YD=0:M$=N$+" STANDS UP":GOSUB1:GOTO40020
41110 INPUT"WEAPON";A$
41120 FORI=0TO2
41130 IFLEFT$(A$,3)=LEFT$(I$(I),3)THENA$=I$(I):GOTO41150
41135 NEXT
41140 M$="YOU DONT HAVE A "+A$:GOSUB1:GOTO40020
41150 FORW=0TO6
41160 IFA$=W$(W)THEN41180
41170 NEXT:W=0
41180 N=RND(20)+W(W,MR)-YD+ML+SL:PRINT"RESULT -- ";
41190 IFN<=1ANDI>0THENM$="YOUR "+A$+" BROKE!":GOSUB1:I$(I)="":GOTO40020
41200 IFN>=20THENPRINT"EXTREME DAMAGE!":MW=RND(W(W,0))*2+2:GOTO41230
41205 IFN>A(MR)+2THENPRINT"MAJOR DAMAGE!":MW=RND(W(W,0))+2:GOTO41230
41210 IFN>=A(MR)THENPRINT"HIT!":MW=RND(W(W,0)):GOTO41230
41220 M$=N$+" MISSED":GOSUB1:GOTO40020
41230 MS=MS-MW:M$="DAMAGE="+STR$(MW)+" "+MN$(MN)+"'S STRENGTH="+STR$(MS):GOSUB1
41235 IFMW>=8THENM$="THE "+MN$(MN)+" FELL DOWN!":GOSUB1:ML=4
41240 IFMS<0THENPRINT"YOU KILLED IT!":RETURN
41250 GOTO40020
50000 PRINT"YOU HAVE BEEN KILLED!":SC=SC-10
50500 PRINT:PRINT"YOUR SCORE WAS ";SC:END
60000 DATA VAMPIRE,GOBLIN,GNOME,DWARF,BESERKER,HOBGOBLIN,GNOLL,TROLL,GARGOYLE,DEMON,STONE GIANT
60010 DATAFIST,DAGGER,MACE,SWORD,BATTLE AXE,MORNING STAR,TWO-HANDED SWORD
60020 DATA17,16,15,14,13,12,11,10
60030 DATA2,0,-5,-4,-3,-2,-1,0,0,0
60040 DATA4,4,-3,-3,-1,0,0,0,1,2
60050 DATA6,11,0,1,0,0,0,0,0,0
60060 DATA7,10,-2,-1,0,0,0,0,0,0
60070 DATA8,12,-1,0,1,1,0,0,0,0
60080 DATA8,15,0,0,1,2,1,1,2,2
60090 DATA10,20,1,2,3,3,2,2,2,2
60091 REM MC-10 EDITS
60092 REM BY JIM GERRIE
